<template>
  <view class="margin-2" @click="detail">
    <view class="flex j-content-between">
        <view>销售订单：{{ data.code }}</view>
        <view class="yellow">{{getStatus}}</view>
    </view>
    <view class="flex j-content-between mt">
        <view class="bold">{{ data.customerName }}</view>
        <view class="price yellow">{{data.acceptTaxAmount}}</view>
    </view>
    <view class="flex j-content-between mt fs">
        <view class="grey">业务员：{{ data.userName }}</view>
        <view class="grey">时间：{{data.busDate}}</view>
    </view>
    <view class="grey mt fs">备注：{{ data.remark }}</view>
  </view>
</template>

<script>
import 'uni.scss'
export default {
    name:'orderlist',
    props:{
    data:{
      type: Object,
      default: {}
    }
  },
  data(){
    return {
        status:{
        'SAVE':'保存',
        'PASS':'审核',
        'CLOSE':'关闭',
        'INVALIDE':'作废',
      },
    }
  },
  created(){
  },
  computed:{
    getStatus(){
        return this.status[this.data.orderStatus]
    }
  },
  methods:{
    detail(e){
      const app = getApp()
      app.globalData.orderdetail = Object.assign({},this.data)
      if (this.data.orderType!=='3') {
        uni.navigateTo({url:`/order/query/detail?id=${this.data.id}`})
      }
    }
  }
}
</script>

<style lang="scss">
.margin-2{
  margin: 30rpx 20rpx;
.mt{
  margin-top: 10rpx;
}
.fs{
  font-size: 26rpx;
}
.yellow{
  color:#DEA605;
}
.price{
  &:before{
  content: '￥';
  font-size: 30rpx;
}

}
}
</style>